This invention relates to curve extracting apparatus, and an NC programming system, and more particularly to a curve extracting apparatus for extracting curves such as closed loops, open loops and hole groups from drawing data prepared with a CAD system or the like, and an NC programming system for forming NC programs by directly utilizing drawing data prepared with a CAD system or the like.
FIG. 1 shows the arrangement of a conventional NC programming system.
First, a machine drawing SH is formed with a machine drawing forming CAD system 20. One example of the machine drawing is as shown in FIGS. 2(a)-2(c).
Next, the operator (or NC programmer) reads the machine drawing SH, and defines curves such as close loops, open loops and hole groups with a curve inputting unit 50 which are to be machined in an NC mode. The procedure of defining those curves is as follows:
(1) In a display processing section 510, a menu display section 521 displays a menu on a graphic display unit 130 to allow the operator to specify a command or command.
(2) The operator selects an icon in the menu by clicking the mouse 160, to specify a curve to be defined, for instance, "a closed loop".
(3) An interaction processing section 540 activates a closed loop defining section 541.
(4) A closed loop defining section 541 causes the graphical display unit 130 to display a menu as a guide necessary for inputting parameters necessary for defining a closed loop.
(5) The operator operates an operating panel 150 or the mouse 160, to input the parameters necessary for the closed loop. The parameters are inputted for each of the edges forming the closed loop. More specifically, the parameters thus inputted are the types of edges, and the X and Y coordinates of the edges. For instance, the parameters of the edges of a closed loop CL indicated by the broken line in FIGS. 2(a)-2(c) are as listed in FIG. 3.
(6) The interaction processing section 540 transmits the inputted parameters to the closed loop defining section 541.
(7) In the closed loop defining section 541, the parameters are utilized to define a closed loop, which is stored as internal curve data D3.
(8) A defined configuration displaying section 523 operates to display the closed loop thus defined on the graphic display unit 130.
(9) The operator determines it from the display whether or not the definition is correct. If the definition is not correct, then the operator corrects it.
In processes of defining an open loop, a hole group and a groove configuration, instead of the closed loop defining section 541 described above, an open loop defining section 542, a hole group defining section 543 and a groove configuration defining section 544 are activated, respectively. However, the processes are fundamentally the same as the above-described process of defining a closed loop.
Next, in an output processing section 170, a machining region configuration outputting section 171 converts the internal curve data D3 thus formed into machining region configuration data D4, which are applied to an NC automatic program forming CAM system 30.
Heretofore, the above-described curve inputting unit 50 is employed for defining curves such as closed loops, open loops and hole groups which are used for formation of NC programs. However, the operation is rather troublesome, and is liable to be erroneous.
That is, the operator reads a drawing SH as shown in FIGS. 2(a)-2(c), to find curves corresponding to a required machining region or regions, and determines edges forming the curves, and inputs the parameters of the edges thus determined. Thus, the operations carried out by the operators are considerably troublesome. The closed loop CL shown in FIG. 2(a) is simple; however, it is necessary to input a large number of pieces of data as is seen from FIG. 3.
In addition, the operator may make mistakes in reading data from the drawing SH or in inputting the necessary parameters.